package com.sgb.kjwl.model.entity.self;

import android.os.Build;
import android.text.TextUtils;

import androidx.annotation.RequiresApi;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;

public class SelfTeamIntroduceEntity2 implements Serializable {

    //工队v2.8.9新增字段 班组工队所用字段
    /**
     * 隶属公司图片地址
     */
    private String affiliatedUnitPic;
    /**
     * 法人
     */
    private String legalPerson;
    /**
     * 代征证号
     */
    private String certificateNumber;
    /**
     * 经营地址
     */
    private List<String> affBusinessAddress;

    /**
     * 经营地址
     */
    private String affBusinessAddressName;
    /**
     * 注册资金
     */
    private String affRegisteredCapital;


    public String getAffBusinessAddressName() {
        return affBusinessAddressName;
    }

    public void setAffBusinessAddressName(String affBusinessAddressName) {
        this.affBusinessAddressName = affBusinessAddressName;
    }

    public String getAffiliatedUnitPic() {
        return affiliatedUnitPic;
    }

    public void setAffiliatedUnitPic(String affiliatedUnitPic) {
        this.affiliatedUnitPic = affiliatedUnitPic;
    }

    public String getLegalPerson() {
        return legalPerson;
    }

    public void setLegalPerson(String legalPerson) {
        this.legalPerson = legalPerson;
    }

    public String getCertificateNumber() {
        return certificateNumber;
    }

    public void setCertificateNumber(String certificateNumber) {
        this.certificateNumber = certificateNumber;
    }

    public List<String> getAffBusinessAddress() {
        return affBusinessAddress;
    }

    public void setAffBusinessAddress(List<String> affBusinessAddress) {
        this.affBusinessAddress = affBusinessAddress;
    }

    public String getAffRegisteredCapital() {
        return affRegisteredCapital;
    }

    public void setAffRegisteredCapital(String affRegisteredCapital) {
        this.affRegisteredCapital = affRegisteredCapital;
    }

    /**
     * legalComName : 合作的公司名称
     * creditCode : 统一社会信用代码
     * registeredCapital : 注册资本
     * businessAddress : 经营住址
     * businessLicense : 营业执照
     * filePath : ["https://shigongbang.oss-cn-hangzhou.aliyuncs.com/machine/610000/2021036411095914859244","https://shigongbang.oss-cn-hangzhou.aliyuncs.com/machine/610000/2021036416481234712751"]
     */

    /*合作单位信息列表*/
    private String legalComName;
    private String creditCode;
    private String registeredCapital;
    private List<String> businessAddress;
    private String businessAddressName;
    private String businessLicense;
    private List<String> filePath;
    private TrustCompanyInfoBean trustCompanyInfo;

    public TrustCompanyInfoBean getTrustCompanyInfo() {
        return trustCompanyInfo;
    }

    public void setTrustCompanyInfo(TrustCompanyInfoBean trustCompanyInfo) {
        this.trustCompanyInfo = trustCompanyInfo;
    }

    public String getLegalComName() {
        return legalComName;
    }

    public void setLegalComName(String legalComName) {
        this.legalComName = legalComName;
    }

    public String getCreditCode() {
        return creditCode;
    }

    public void setCreditCode(String creditCode) {
        this.creditCode = creditCode;
    }

    public String getRegisteredCapital() {
        return registeredCapital;
    }

    public void setRegisteredCapital(String registeredCapital) {
        this.registeredCapital = registeredCapital;
    }

    public List<String> getBusinessAddress() {
        return businessAddress;
    }

    public void setBusinessAddress(List<String> businessAddress) {
        this.businessAddress = businessAddress;
    }

    public String getBusinessAddressName() {
        return businessAddressName;
    }

    public void setBusinessAddressName(String businessAddressName) {
        this.businessAddressName = businessAddressName;
    }

    public String getBusinessLicense() {
        return businessLicense;
    }

    public void setBusinessLicense(String businessLicense) {
        this.businessLicense = businessLicense;
    }

    public List<String> getFilePath() {
        return filePath;
    }

    public void setFilePath(List<String> filePath) {
        this.filePath = filePath;
    }

    public String getAvatarAddress() {
        return avatarAddress;
    }

    public class TrustCompanyInfoBean {

        /**
         * legalName : 法人名称
         * businessLicense : https://shigongbang.oss-cn-hangzhou.aliyuncs.com/machine/610000/2021036411090191501959
         * legalPhone : 18792791601
         * creditCode : 12345678910dad
         * legalComName : 公司名称
         * registeredCapital : 120000
         * filePath : ["https://shigongbang.oss-cn-hangzhou.aliyuncs.com/machine/610000/2021036411095914859244"]
         * trustCompany : 刘帅家的企业
         * businessAddress : 经营地址
         */

        private String legalName;
        private String businessLicense;
        private String legalPhone;
        private String creditCode;
        private String legalComName;
        private String registeredCapital;
        private List<String> filePath;
        private String trustCompany;
        private String businessAddress;

        public String getLegalName() {
            return legalName;
        }

        public void setLegalName(String legalName) {
            this.legalName = legalName;
        }

        public String getBusinessLicense() {
            return businessLicense;
        }

        public void setBusinessLicense(String businessLicense) {
            this.businessLicense = businessLicense;
        }

        public String getLegalPhone() {
            return legalPhone;
        }

        public void setLegalPhone(String legalPhone) {
            this.legalPhone = legalPhone;
        }

        public String getCreditCode() {
            return creditCode;
        }

        public void setCreditCode(String creditCode) {
            this.creditCode = creditCode;
        }

        public String getLegalComName() {
            return legalComName;
        }

        public void setLegalComName(String legalComName) {
            this.legalComName = legalComName;
        }

        public String getRegisteredCapital() {
            return registeredCapital;
        }

        public void setRegisteredCapital(String registeredCapital) {
            this.registeredCapital = registeredCapital;
        }

        public List<String> getFilePath() {
            return filePath;
        }

        public void setFilePath(List<String> filePath) {
            this.filePath = filePath;
        }

        public String getTrustCompany() {
            return trustCompany;
        }

        public void setTrustCompany(String trustCompany) {
            this.trustCompany = trustCompany;
        }

        public String getBusinessAddress() {
            return businessAddress;
        }

        public void setBusinessAddress(String businessAddress) {
            this.businessAddress = businessAddress;
        }
    }

    public void setAvatarAddress(String avatarAddress) {
        this.avatarAddress = avatarAddress;
    }

    private String teamName;
    private String legalPhone;
    private String no;
    private String serviceAreaName;
    private String legalEduName;
    private String companyName;
    private String latitude;
    private String userNo;
    private String legalProvNo;
    private String categoryName;
    private String basicSituation;
    private String legalName;
    private String manageStructure;
    private String companyNo;
    private String areaNo;
    private String legalAreaNo;
    private String teamHistory;
    private String contact;
    private String provinceNo;
    private String legalAddressName;
    private String legalEdu;
    private String imName;
    private String businessPhil;
    private String longitude;
    private String avatarAddress;
    private String cityNo;
    private String provinceName;
    private String cityName;
    private int teamType; // 0  施工队  1  班组   2承包商
    private String areaName;
    private String trustCompany;
    private String categoryNo;
    private String category;
    private String principalSex; //负责人性别0男 1女
    private String principalNation;//负责人民族No
    private String principalNationName;//负责人民族名称
    private String principalAge;//负责人年龄
    private List<String> principalHometown;//籍贯编号
    private String principalHometownName;//籍贯名称

    public List<String> getPrincipalHometown() {
        return principalHometown;
    }

    public void setPrincipalHometown(List<String> principalHometown) {
        this.principalHometown = principalHometown;
    }

    public String getPrincipalHometownName() {
        if (principalHometownName == null) {
            return "";
        }
        return principalHometownName;
    }

    public void setPrincipalHometownName(String principalHometownName) {
        this.principalHometownName = principalHometownName;
    }

    public String getPrincipalAge() {
        if (principalAge == null || "0".equals(principalAge)) {
            return "";
        }
        return principalAge;
    }

    public void setPrincipalAge(String principalAge) {
        this.principalAge = principalAge;
    }

    public String getPrincipalNation() {
        return principalNation;
    }

    public void setPrincipalNation(String principalNation) {
        this.principalNation = principalNation;
    }

    public String getPrincipalNationName() {
        if (principalNationName == null) {
            return "";
        }
        return principalNationName;
    }

    public void setPrincipalNationName(String principalNationName) {
        this.principalNationName = principalNationName;
    }

    public String getPrincipalSex() {
        if (principalSex == null) {
            return "";
        }
        return principalSex;
    }

    public void setPrincipalSex(String principalSex) {
        this.principalSex = principalSex;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getCategoryNo() {
        return categoryNo;
    }

    public void setCategoryNo(String categoryNo) {
        this.categoryNo = categoryNo;
    }

    public String getTrustCompany() {
        return trustCompany;
    }

    public void setTrustCompany(String trustCompany) {
        this.trustCompany = trustCompany;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public int getTeamType() {
        return teamType;
    }

    public void setTeamType(int teamType) {
        this.teamType = teamType;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getLegalPhone() {
        return legalPhone;
    }

    public void setLegalPhone(String legalPhone) {
        this.legalPhone = legalPhone;
    }

    public String getLegalEduName() {
        return legalEduName;
    }

    public void setLegalEduName(String legalEduName) {
        this.legalEduName = legalEduName;
    }

    public String getUserNo() {
        return userNo;
    }

    public void setUserNo(String userNo) {
        this.userNo = userNo;
    }

    public String getLegalProvNo() {
        return legalProvNo;
    }

    public void setLegalProvNo(String legalProvNo) {
        this.legalProvNo = legalProvNo;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getLegalName() {
        return legalName;
    }

    public void setLegalName(String legalName) {
        this.legalName = legalName;
    }

    public String getAreaNo() {
        return areaNo;
    }

    public void setAreaNo(String areaNo) {
        this.areaNo = areaNo;
    }

    public String getLegalAreaNo() {
        return legalAreaNo;
    }

    public void setLegalAreaNo(String legalAreaNo) {
        this.legalAreaNo = legalAreaNo;
    }

    public String getLegalAddressName() {
        return legalAddressName;
    }

    public void setLegalAddressName(String legalAddressName) {
        this.legalAddressName = legalAddressName;
    }

    public String getLegalEdu() {
        return legalEdu;
    }

    public void setLegalEdu(String legalEdu) {
        this.legalEdu = legalEdu;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLegalAddr() {
        return legalAddr;
    }

    public void setLegalAddr(String legalAddr) {
        this.legalAddr = legalAddr;
    }

    public String getLegalAge() {
        return legalAge;
    }

    public void setLegalAge(String legalAge) {
        this.legalAge = legalAge;
    }

    public String getLegalCityNo() {
        return legalCityNo;
    }

    public void setLegalCityNo(String legalCityNo) {
        this.legalCityNo = legalCityNo;
    }

    public int getIsCompany() {
        return isCompany;
    }

    public void setIsCompany(int isCompany) {
        this.isCompany = isCompany;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public boolean isFocus() {
        return isFocus;
    }

    public void setFocus(boolean focus) {
        isFocus = focus;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    private String address;
    private String legalAddr;
    private String legalAge;
    private String legalCityNo;
    private int isCompany;
    private String userName;
    private String customerName;
    private String imId;
    private String phoneNumber;
    private boolean isFocus;
    private long createTime;
    private String teamSize;
    private String teamNumber;
    private List<BusinessScopesBean> businessScopes;
    private List<ServiceAreasBean> serviceAreas; //工队简介获取字段

    public String getTeamNumber() {
        return teamNumber;
    }

    public void setTeamNumber(String teamNumber) {
        this.teamNumber = teamNumber;
    }

    public String getManageStructure() {
        return manageStructure;
    }

    public void setManageStructure(String manageStructure) {
        this.manageStructure = manageStructure;
    }

    public String getBasicSituation() {
        return basicSituation;
    }

    public void setBasicSituation(String basicSituation) {
        this.basicSituation = basicSituation;
    }

    public String getBusinessPhil() {
        return businessPhil;
    }

    public void setBusinessPhil(String businessPhil) {
        this.businessPhil = businessPhil;
    }

    public String getTeamHistory() {
        return teamHistory;
    }

    public void setTeamHistory(String teamHistory) {
        this.teamHistory = teamHistory;
    }

  /*  public List<ServiceAreasBean> getServiceAreaDTOS() {
        return serviceAreaDTOS;
    }

    public void setServiceAreaDTOS(List<ServiceAreasBean> serviceAreaDTOS) {
        this.serviceAreaDTOS = serviceAreaDTOS;
    }*/

    public String getCityNo() {
        return cityNo;
    }

    public void setCityNo(String cityNo) {
        this.cityNo = cityNo;
    }

    public String getImId() {
        return imId;
    }

    public void setImId(String imId) {
        this.imId = imId;
    }

    public String getProvinceNo() {
        return provinceNo;
    }

    public void setProvinceNo(String provinceNo) {
        this.provinceNo = provinceNo;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getTeamName() {
        return teamName;
    }

    public void setTeamName(String teamName) {
        this.teamName = teamName;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getCompanyNo() {
        return companyNo;
    }

    public void setCompanyNo(String companyNo) {
        this.companyNo = companyNo;
    }

    public String getTeamSize() {
        return teamSize;
    }

    public void setTeamSize(String teamSize) {
        this.teamSize = teamSize;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getImName() {
        return imName;
    }

    public void setImName(String imName) {
        this.imName = imName;
    }

    public String getServiceAreaName() {
        return serviceAreaName;
    }

    public void setServiceAreaName(String serviceAreaName) {
        this.serviceAreaName = serviceAreaName;
    }

    public List<BusinessScopesBean> getBusinessScopes() {
        return businessScopes;
    }

    public void setBusinessScopes(List<BusinessScopesBean> businessScopes) {
        this.businessScopes = businessScopes;
    }

    public List<ServiceAreasBean> getServiceAreas() {
        return serviceAreas;
    }

    public void setServiceAreas(List<ServiceAreasBean> serviceAreas) {
        this.serviceAreas = serviceAreas;
    }

    public static class BusinessScopesBean implements Serializable {
        /**
         * firstCategoryName : 市政工程
         * sixthCategoryNo :
         * secondCategoryNo : 201903133233697
         * fourCategoryName :
         * thirdCategoryNo :
         * fifthCategoryName :
         * sixthCategoryName :
         * secondCategoryName : 爆破施工队
         * fourCategoryNo :
         * thirdCategoryName :
         * firstCategoryNo : 201903132124176
         * fifthCategoryNo :
         */

        private String firstCategoryName;
        private String sixthCategoryNo;
        private String secondCategoryNo;
        private String fourCategoryName;
        private String thirdCategoryNo;
        private String fifthCategoryName;
        private String sixthCategoryName;
        private String secondCategoryName;
        private String fourCategoryNo;
        private String thirdCategoryName;
        private String firstCategoryNo;
        private String fifthCategoryNo;

        public String getFirstCategoryName() {
            return firstCategoryName;
        }

        public void setFirstCategoryName(String firstCategoryName) {
            this.firstCategoryName = firstCategoryName;
        }

        public String getSixthCategoryNo() {
            return sixthCategoryNo;
        }

        public void setSixthCategoryNo(String sixthCategoryNo) {
            this.sixthCategoryNo = sixthCategoryNo;
        }

        public String getSecondCategoryNo() {
            return secondCategoryNo;
        }

        public void setSecondCategoryNo(String secondCategoryNo) {
            this.secondCategoryNo = secondCategoryNo;
        }

        public String getFourCategoryName() {
            return fourCategoryName;
        }

        public void setFourCategoryName(String fourCategoryName) {
            this.fourCategoryName = fourCategoryName;
        }

        public String getThirdCategoryNo() {
            return thirdCategoryNo;
        }

        public void setThirdCategoryNo(String thirdCategoryNo) {
            this.thirdCategoryNo = thirdCategoryNo;
        }

        public String getFifthCategoryName() {
            return fifthCategoryName;
        }

        public void setFifthCategoryName(String fifthCategoryName) {
            this.fifthCategoryName = fifthCategoryName;
        }

        public String getSixthCategoryName() {
            return sixthCategoryName;
        }

        public void setSixthCategoryName(String sixthCategoryName) {
            this.sixthCategoryName = sixthCategoryName;
        }

        public String getSecondCategoryName() {
            return secondCategoryName;
        }

        public void setSecondCategoryName(String secondCategoryName) {
            this.secondCategoryName = secondCategoryName;
        }

        public String getFourCategoryNo() {
            return fourCategoryNo;
        }

        public void setFourCategoryNo(String fourCategoryNo) {
            this.fourCategoryNo = fourCategoryNo;
        }

        public String getThirdCategoryName() {
            return thirdCategoryName;
        }

        public void setThirdCategoryName(String thirdCategoryName) {
            this.thirdCategoryName = thirdCategoryName;
        }

        public String getFirstCategoryNo() {
            return firstCategoryNo;
        }

        public void setFirstCategoryNo(String firstCategoryNo) {
            this.firstCategoryNo = firstCategoryNo;
        }

        public String getFifthCategoryNo() {
            return fifthCategoryNo;
        }

        public void setFifthCategoryNo(String fifthCategoryNo) {
            this.fifthCategoryNo = fifthCategoryNo;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            BusinessScopesBean that = (BusinessScopesBean) o;
            boolean isFlag1 = eq(firstCategoryNo, that.firstCategoryNo);
            boolean isFlag2 = eq(secondCategoryNo, that.secondCategoryNo);
            boolean isFlag3 = eq(thirdCategoryNo, that.thirdCategoryNo);
            boolean isFlag4 = eq(fourCategoryNo, that.fourCategoryNo);
            boolean isFlag5 = eq(fifthCategoryNo, that.fifthCategoryNo);
            boolean isFlag6 = eq(sixthCategoryNo, that.sixthCategoryNo);
            return isFlag1 && isFlag2 && isFlag3 && isFlag4 && isFlag5 && isFlag6;
        }

        private boolean eq(String no, String that) {
            if (!TextUtils.isEmpty(no) && !TextUtils.isEmpty(that)) {
                return no.equals(that);
            } else if (!TextUtils.isEmpty(no) && TextUtils.isEmpty(that) || TextUtils.isEmpty(no) && !TextUtils.isEmpty(that)) {
                return false;
            } else {
                return true;
            }
        }
    }

    public static class ServiceAreasBean implements Serializable {
        /**
         * areaNo : 110000
         * name : 北京
         */

        private String areaNo;
        private String name;

        public String getAreaNo() {
            return areaNo;
        }

        public void setAreaNo(String areaNo) {
            this.areaNo = areaNo;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            ServiceAreasBean bean = (ServiceAreasBean) o;
            return areaNo.equals(bean.areaNo) &&
                    name.equals(bean.name);
        }

        @RequiresApi(api = Build.VERSION_CODES.KITKAT)
        @Override
        public int hashCode() {
            return Objects.hash(areaNo, name);
        }
    }


}
